package com.service.aliyun;

import com.aliyun.oss.ClientException;
import com.aliyun.oss.OSSException;
import com.aliyuncs.exceptions.ServerException;

/**
 * @author geliyang
 *
 */
public interface IAliyunService {

	/**
	 * 封装上传oss，刷新cdn
	 * @param path 在oss上的地址，一般放id
	 * @param obj InputStream或者String
	 * @return
	 * @throws OSSException
	 * @throws ClientException
	 * @throws Exception
	 */
	public Integer uploadAndRefresh(String path, Object obj) throws OSSException, ClientException, ServerException, Exception;
	
	/**
	 * 封装上传oss
	 * @param path 在oss上的地址，一般放id
	 * @param obj InputStream或者String
	 * @return
	 * @throws OSSException
	 * @throws ClientException
	 * @throws Exception
	 */
	public Integer upload(String path, Object obj) throws OSSException, ClientException, ServerException, Exception;
}
